Visual Basic (Declaration) | |
---|---|
Public Function GetEnumerator() As IEnumerator(Of KeyValuePair(Of TKey,TValue)) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As WeakRefDictionary(Of TKey,TValue) Dim value As IEnumerator(Of KeyValuePair(Of TKey,TValue)) value = instance.GetEnumerator() |
C# | |
---|---|
public IEnumerator<KeyValuePair<TKey,TValue>> GetEnumerator() |
C++/CLI | |
---|---|
public: IEnumerator<KeyValuePair<TKey^,TValue^>>^ GetEnumerator(); |
Return Value
The enumerator.As objects are discovered and returned from the enumerator, a strong reference is temporarily held on the object so that it will continue to exist for the duration of the enumeration. Once the enumeration of that object is over, the strong reference is removed. If you wish to keep values alive for use after enumeration, to ensure that they stay alive, you should store strong references to them during enumeration.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family